<div class="problemlist_item">
    <div class="header" id="problem_filter_bar">
        筛选
    </div>
    <div class="body" id="problem_filter">
        <div class="content">
            <ol class="breadcrumb">
            <li><strong>分类导航</strong></li>
            <li><a href="?classify_id=0{% if asgn_id != '' %}&asgn_id={{ asgn_id }}{% endif %}">全部题目</a></li>
            {% for ct in classify_tree %}
                <li>{% if forloop.last %}{{ ct.title }}{% else %}<a href="?classify_id={{ ct.id }}{% if asgn_id != '' %}&asgn_id={{ asgn_id }}{% endif %}">{{ ct.title }}</a>{% endif %}</li>
            {% empty %}
            {% endfor %}
        </ol>
        {% if classifications.0 %}
            <table  class="table table-nobordered">
                <tr>
                    <td width="80">分类</td>
                    <td>
                        {% for c in classifications %}
                            <a href="?classify_id={{ c.id }}{% if asgn_id != '' %}&asgn_id={{ asgn_id }}{% endif %}" class=" label label-bordered label-transparent">{{ c.title }}</a>&nbsp;&nbsp;
                        {% empty %}
                            没有分类数据
                        {% endfor %}
                    </td>
                </tr>
            </table>
        {% endif %}
            <hr><a id="problem_filter_open_more" href="javascript:void(0)">点击展开更多项目</a>
            <form class="form form-inline" method="get" action="" id="problem_filter_form" style="display: none;">
                <table class="table table-nobordered">
                    <tr>
                        <td width="80">题目名称</td>
                        <td><input name="keyword" type="text" class="form-control" value="{{ keyword }}" placeholder="标题的关键字"/></td>
                    </tr>
                    <tr>
                        <td>发布者</td>
                        <td>
                            <input name="author_id" type="text" class="form-control" value="{{ author_id }}" placeholder="发布者的名称"/>
                            &nbsp;
                            <select name="author_type" class="form-control">
                                <option value="">学号/工号/ID</option>
                                <option value="[n]" {% if author_type == '[n]' %}selected{% endif %}>昵称</option>
                                <option value="[r]" {% if author_type == '[r]' %}selected{% endif %}>真实姓名</option>
                            </select>
                        </td>
                    </tr>
                    <tr>
                        <td>难易度</td>
                        <td>
                        <a href="javascript:void(0)" class="filter-diff label label-bordered{% if diff == -1 %} label-primary{% else %} label-transparent{% endif %}">全部</a>&nbsp;&nbsp;
                        {% for d in difficulty %}
                            <a href="javascript:void(0)" dat-val="{{ d.0 }}" class="filter-diff label label-bordered{% if d.0 == diff %} label-primary{% else %} label-transparent{% endif %}">{{ d.1 }}</a>&nbsp;&nbsp;
                        {% endfor %}
                        </td>
                        <input type="hidden" id="ipt-filter-diff" value="{{ diff }}" name="diff">
                    </tr>
                    <tr>
                        <td>排序</td>
                        <td>
                            <a href="javascript:void(0)" class="filter-order label label-bordered{% if not desc %} label-primary{% else %} label-transparent{% endif %}" dat-val="0">正序排列</a>&nbsp;&nbsp;
                            <a href="javascript:void(0)" class="filter-order label label-bordered{% if desc %} label-primary{% else %} label-transparent{% endif %}" dat-val="1">倒序排列</a>&nbsp;&nbsp;
                            <input type="hidden" id="ipt-filter-order" value="{{ desc }}" name="desc">
                        </td>
                    </tr>
                    <input type="hidden" value="{{ asgn_id }}" name="asgn_id">
                    <input type="hidden" value="{{ classify_id }}" name="classify_id">
                </table>
                <hr>
                <input type="submit" class="btn btn-primary" value="执行筛选">
            </form>
        </div>
    </div>
</div>

